<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script type="text/javascript" src="resources/js/jquery/jquery-1.10.2.js"></script>
	<script src="resources/bootstrap/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="resources/css/style.css"></link>
	<link href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
	
	<script type="text/javascript">
		var jq = jQuery.noConflict();
		var isUser;
	</script>
</head>
<body>
	<%@ page import="org.springframework.security.core.context.SecurityContextHolder, java.util.List" %>
	<%
		Boolean isAdmin = false;
		Boolean isUser = false;
		List roles = (List) SecurityContextHolder.getContext().getAuthentication().getAuthorities();
		for (Object r : roles) {
			if (r.toString().equals("ROLE_USER")) isUser = true;
		}
	%>
	<script type="text/javascript">
		isUser = <%= isUser %>;
	</script>
	
	<div id="container">
	
		<jsp:include page="menubar.jsp"></jsp:include>
		<jsp:include page="right_sidebar.jsp"></jsp:include>
		
		<div id="content">
		<%if (!isUser) {%>
			<center><h2>You must be authorized as user!</h2></center>
		<%} else {%>
			<table>
			<tr>
				<td>
				</td>
			</tr>
			</table>
		
		<%}%>
		</div>
	
	</div>
	
	<jsp:include page="footer.jsp"></jsp:include>
	
	
	
	<script type="text/javascript">
	
	</script>

</body>
</html>